const requestFn = require('../request.js')

const baseUrl = "file/"
const API = {
  addFile:"add",
  deleteFile:"delete",
  queryFile:'list/page',
  updateFile:"update",
  listFile:"list",
  listFilePro:"list/pageVO",
  //searchFile:"search/page/vo",
 
}

function addFile(data,session){
  return requestFn.request(baseUrl+API.login,data,"POST",session)
}
// function searchFile(data,session){
//   return requestFn.request(baseUrl+API.searchFile,data,"POST",session)
// }
function deleteFile(data,session){
  return requestFn.request(baseUrl+API.deleteFile,data,"POST",session)
}
function queryFile(data,session){
  return requestFn.request(baseUrl+API.queryFile,data,"GET",session)
}
function listFile(data,session){
  return requestFn.file(baseUrl+API.listFile,data,"GET",session)
}
function updateFile(data,session){
  return requestFn.request(baseUrl+API.register,data,"POST",session)
}
function listFilePro(data,session){
  return requestFn.request(baseUrl+API.listFilePro,data,"GET",session)
}

module.exports = {
  addFile,
  deleteFile,
  queryFile,
  listFile,
  updateFile,
  listFilePro,
  //searchFile
}